21 January 2023
Eight years ago, a Redditor was stunned after discovering his math book had a mysterious able of random numbers!
Turns out that…
A long time ago in a galaxy not so far away…. people had no computers. If they wanted to sample a random number, they had to use random number tables.
Used to draw random samples
Said to be more effective than using dice or cards
Became replaced by random number generators
Archaeologists and historians of statistics are trying to decipher how exactly random number tables were used
| 91418 | 56200 | 50739 | 93661 | 90459 |
| 93400 | 75556 | 74001 | 97062 | 22345 |
| 35466 | 21985 | 93186 | 20456 | 98011 |
| 83910 | 68472 | 32733 | 52275 | 94253 |
| 67115 | 72751 | 51144 | 59870 | 17337 |
Table 1: An example of a random number table. Shocking indeed.
| 1 | 2 |
| 3 | 4 |
| 5 | 6 |
| 7 | 8 |
Table 2: A not-so-random table.
There is no math formula for generating truly random numbers.
Instead, I share some formulas for the continuous uniform distribution from which we have been sampling today.
\[\begin{align} f(x) = \begin{cases} \frac{1}{b-a} & \text{for } a \leq x \leq b \ 0 & \text{for } x < a \text{ or } x > b \end{cases} \\ f(x) = \begin{cases} \frac{1}{2\sigma\sqrt{3}} & \text{for } -\sigma\sqrt{3}\leq x - \mu \leq \sigma\sqrt{3} \\ 0 \text{ otherwise}\end{cases} \end{align}\]
# set seed if you want set.seed(42) # sample 10 continuous values between 100 and a hundred runif(10, 100, 999) # sample discrete values round(runif(10, 100, 999),0)
Continuous uniform distribution. (2023, 01, 21). In Wikipedia. https://en.wikipedia.org/wiki/Continuous_uniform_distribution